Image binarization refers to the process of converting an image represented by pixel values which may assume multiple levels to pixel values which can be one of two values, e.g., a first value corresponding to foreground and a second value corresponding to background. Image binarization can be used convert a gray scale or a color image to a black and white image. One approach to using image binarization is to choose a threshold value and classify each of the pixels with values above this threshold as white, and each of the other pixels as black. Frequently, binarization is used as a pre-processing step before performing optical character recognition (OCR). In fact, most OCR packages on the market work only on bi-level (black & white) images. Binarization also has application in compression, e.g. the binarized image can be used as the mask in the Mixed Raster Content (MRC) model in the JPEG 2000 part 6.
One well known method used to automatically perform histogram shape-based image thresholding is called the Otsu method. The Otsu method assumes that the image to be thresholded contains two classes of pixels (e.g. foreground and background) and then calculates the optimum threshold separating those two classes so that their combined spread (intra-class variance) is minimal.
Otsu's method involves exhaustively searching for the threshold that minimizes the intra-class variance, defined as a weighted sum of variances of the two classes:σω2(t)=ω1(t)σ12(t)+ω2(t)σ22(t)weights ωi are the probabilities of the two classes separated by a threshold t and σi2 variances of these classes.
Otsu shows that minimizing the intra-class variance is the same as maximizing inter-class variance:σb2(t)=σ2−σω2(t)=ω1(t)ω2(t)[μ1(t)−μ2(t)]2 which is expressed in terms of class probabilities ωi and class means μi.
Although the approach of using the Otsu method to obtain a global binarization threshold is efficient in processing some types of images, e.g. bi-modal images, it does not work well in processing all other types of images. Accordingly, it should be appreciated that there is a need for improved image binarization methods.
It would be beneficial if different alternative approaches to selecting a global binarization threshold were available. It would also be advantageous if methods and apparatus were developed which selected, e.g., automatically, an appropriate binarization threshold determination method and obtained a binarization threshold value, e.g., a global or local threshold, to use for the binarization, from among a plurality of alternatives, for at least some types of input images.
In some, but not necessarily all cases, finding one threshold compatible to the entire image is very difficult, and, for some images, may not be possible. Therefore, there is a need, at least in the case of some applications, for methods and apparatus that support determining and using different binarization thresholds for different image sub-blocks for at least some types of images, in addition to supporting global binarization thresholds. Methods and apparatus that determine, e.g., automatically determine, when to use a single global binarization threshold and when to use a plurality of local binarization thresholds would also be beneficial.